package com.Emotion.emotion.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.Emotion.emotion.mapper.EmotionRecordsMapper;
import com.Emotion.emotion.domain.EmotionRecords;
import com.Emotion.emotion.service.IEmotionRecordsService;

/**
 * 情绪检测记录Service业务层处理
 * 
 * @author wangtao
 * @date 2025-05-08
 */
@Service
public class EmotionRecordsServiceImpl implements IEmotionRecordsService 
{
    @Autowired
    private EmotionRecordsMapper emotionRecordsMapper;

    /**
     * 查询情绪检测记录
     * 
     * @param emotionId 情绪检测记录主键
     * @return 情绪检测记录
     */
    @Override
    public EmotionRecords selectEmotionRecordsByEmotionId(Long emotionId)
    {
        return emotionRecordsMapper.selectEmotionRecordsByEmotionId(emotionId);
    }

    /**
     * 查询情绪检测记录列表
     * 
     * @param emotionRecords 情绪检测记录
     * @return 情绪检测记录
     */
    @Override
    public List<EmotionRecords> selectEmotionRecordsList(EmotionRecords emotionRecords)
    {
        return emotionRecordsMapper.selectEmotionRecordsList(emotionRecords);
    }

    /**
     * 新增情绪检测记录
     * 
     * @param emotionRecords 情绪检测记录
     * @return 结果
     */
    @Override
    public int insertEmotionRecords(EmotionRecords emotionRecords)
    {
        return emotionRecordsMapper.insertEmotionRecords(emotionRecords);
    }

    /**
     * 修改情绪检测记录
     * 
     * @param emotionRecords 情绪检测记录
     * @return 结果
     */
    @Override
    public int updateEmotionRecords(EmotionRecords emotionRecords)
    {
        return emotionRecordsMapper.updateEmotionRecords(emotionRecords);
    }

    /**
     * 批量删除情绪检测记录
     * 
     * @param emotionIds 需要删除的情绪检测记录主键
     * @return 结果
     */
    @Override
    public int deleteEmotionRecordsByEmotionIds(Long[] emotionIds)
    {
        return emotionRecordsMapper.deleteEmotionRecordsByEmotionIds(emotionIds);
    }

    /**
     * 删除情绪检测记录信息
     * 
     * @param emotionId 情绪检测记录主键
     * @return 结果
     */
    @Override
    public int deleteEmotionRecordsByEmotionId(Long emotionId)
    {
        return emotionRecordsMapper.deleteEmotionRecordsByEmotionId(emotionId);
    }
}
